home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / network / lpr / lpr.frm (.txt) next >
Encoding:
Visual Basic Form  |  1995-11-07  |  4.9 KB  |  169 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   5415
  5.    ClientLeft      =   1200
  6.    ClientTop       =   600
  7.    ClientWidth     =   7365
  8.    Height          =   5820
  9.    Left            =   1140
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   5415
  12.    ScaleWidth      =   7365
  13.    Top             =   255
  14.    Width           =   7485
  15.    Begin TextBox txt_file 
  16.       Height          =   375
  17.       Left            =   1080
  18.       TabIndex        =   9
  19.       Text            =   "C:\LPR\PRINT.PRN"
  20.       Top             =   840
  21.       Width           =   1815
  22.    End
  23.    Begin CommandButton Command5 
  24.       Caption         =   "Print File"
  25.       Height          =   495
  26.       Left            =   3120
  27.       TabIndex        =   7
  28.       Top             =   120
  29.       Width           =   1935
  30.    End
  31.    Begin LPR LPR1 
  32.       DataFile        =   "C:\AUTOEXEC.BAT"
  33.       Host            =   ""
  34.       JobName         =   "STEVESJOB"
  35.       Left            =   720
  36.       List            =   ""
  37.       Port            =   515
  38.       Printer         =   "lp"
  39.       PrintType       =   0  'Postscript
  40.       Top             =   1680
  41.       User            =   "SBRIDGES"
  42.    End
  43.    Begin CommandButton Command4 
  44.       Caption         =   "Remove Jobs"
  45.       Height          =   495
  46.       Left            =   5160
  47.       TabIndex        =   6
  48.       Top             =   2280
  49.       Width           =   1935
  50.    End
  51.    Begin ListBox List1 
  52.       Height          =   1980
  53.       Left            =   120
  54.       TabIndex        =   5
  55.       Top             =   3360
  56.       Width           =   7095
  57.    End
  58.    Begin CommandButton Command3 
  59.       Caption         =   "Print Waiting"
  60.       Height          =   495
  61.       Left            =   5160
  62.       TabIndex        =   4
  63.       Top             =   1560
  64.       Width           =   1935
  65.    End
  66.    Begin CommandButton Command2 
  67.       Caption         =   "Queue State (L)"
  68.       Height          =   495
  69.       Left            =   5160
  70.       TabIndex        =   3
  71.       Top             =   840
  72.       Width           =   1935
  73.    End
  74.    Begin TextBox txt_host 
  75.       Height          =   285
  76.       Left            =   1080
  77.       TabIndex        =   2
  78.       Text            =   "3.100.36.21"
  79.       Top             =   240
  80.       Width           =   1815
  81.    End
  82.    Begin CommandButton Command1 
  83.       Caption         =   "Queue State (S)"
  84.       Height          =   495
  85.       Left            =   5160
  86.       TabIndex        =   0
  87.       Top             =   120
  88.       Width           =   1935
  89.    End
  90.    Begin Label Label2 
  91.       Caption         =   "File To Print:"
  92.       Height          =   495
  93.       Left            =   120
  94.       TabIndex        =   8
  95.       Top             =   960
  96.       Width           =   735
  97.    End
  98.    Begin Label Label1 
  99.       Caption         =   "Host:"
  100.       Height          =   255
  101.       Left            =   120
  102.       TabIndex        =   1
  103.       Top             =   240
  104.       Width           =   735
  105.    End
  106. Option Explicit
  107. Sub Command1_Click ()
  108.  list1.Clear
  109.  lpr1.Host = Trim$(txt_host)
  110.   screen.MousePointer = 11
  111.  lpr1.Action = 2
  112. End Sub
  113. Sub Command2_Click ()
  114.  list1.Clear
  115.  lpr1.DebugMode = 1
  116.  lpr1.Host = Trim$(txt_host)
  117.   screen.MousePointer = 11
  118.  lpr1.Action = 3
  119. End Sub
  120. Sub Command3_Click ()
  121.  list1.Clear
  122.  lpr1.Host = Trim$(txt_host)
  123.   screen.MousePointer = 11
  124.  lpr1.Action = 0
  125. End Sub
  126. Sub Command4_Click ()
  127.  list1.Clear
  128.  lpr1.Host = Trim$(txt_host)
  129.   screen.MousePointer = 11
  130.  lpr1.Action = 4
  131. End Sub
  132. Sub Command5_Click ()
  133.  list1.Clear
  134.  lpr1.Host = Trim$(txt_host)
  135.  lpr1.PrintType = 3
  136.  lpr1.DebugMode = 1
  137.  lpr1.DataFile = Trim$(txt_file)
  138.  screen.MousePointer = 11
  139.  lpr1.Action = 1
  140. End Sub
  141. Sub LPR1_AsyncError (LprCMD As Integer, WinsockError As Integer)
  142.   list1.AddItem "ASYNC ERR. cmd=" & Str$(LprCMD) & " Sock err=" & Str$(WinsockError)
  143. End Sub
  144. Sub LPR1_PrintAnyWaitingJobs (returnCode As Integer)
  145.     list1.AddItem "rc = " & Str$(returnCode)
  146.     list1.Refresh
  147.     screen.MousePointer = 0
  148. End Sub
  149. Sub LPR1_PrintFile (PrtType As Integer, returnCode As Integer)
  150.     list1.AddItem "PrtType = " & Str$(PrtType) & " rc = " & Str$(returnCode)
  151.     list1.Refresh
  152.     If PrtType = 5 Then screen.MousePointer = 0
  153. End Sub
  154. Sub LPR1_QueueStateLong (noMore As Integer, Msg As String, ErrCode As Integer)
  155.     list1.AddItem "NoMore = " & Str$(noMore) & " Msg = " & Msg & " Err = " & Str$(ErrCode)
  156.     list1.Refresh
  157.     If noMore Then screen.MousePointer = 0
  158. End Sub
  159. Sub LPR1_QueueStateShort (noMore As Integer, Msg As String, ErrCode As Integer)
  160.    list1.AddItem "NoMore = " & Str$(noMore) & " Msg = " & Msg & " Err = " & Str$(ErrCode)
  161.    list1.Refresh
  162.    If noMore Then screen.MousePointer = 0
  163. End Sub
  164. Sub LPR1_RemoveJobs (returnCode As Integer)
  165. list1.AddItem "rc = " & Str$(returnCode)
  166. list1.Refresh
  167. screen.MousePointer = 0
  168. End Sub
  169.